package demo04;

public class Demo01Array {
    public static void main(String[] args) {
        Person[] array = new Person[3];
        Person one = new Person("张三", 18);
        Person two = new Person("李四", 19);
        Person three = new Person("王五", 20);
        array[0]=one;
        array[1]=two;
        array[2]=three;
        System.out.println(array[0].getName());
        System.out.println(array[1].getName());
        System.out.println(array[2].getName());


//        int[] array1=new int[5];
//        array1[0]=1;
    }
}
